<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />



  <meta name="google-site-verification" content="6Ik8pGDtBtOTGCKiPW_YXR0Wqp7FfhOllj0Bi92eBDo" />







  <meta name="baidu-site-verification" content="code-uIla4FKPmw" />







  
  
  <link href="/berlinblog/libs/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/berlinblog/libs/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/berlinblog/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Docker," />





  <link rel="alternate" href="/berlinblog/atom.xml" title="白叁木小肆" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="https://raw.githubusercontent.com/A-limon/pacman/master/source/img/favicon.ico?v=5.1.2" />






<meta name="description" content="概述12345# 启动和停止容器docker start IDdocker restart IDdocker stop IDdocker kill ID">
<meta property="og:type" content="article">
<meta property="og:title" content="Docker操作">
<meta property="og:url" content="https://berlinwong.gitee.io/berlinblog/2021/08/26/Docker%E6%A6%82%E8%BF%B0/index.html">
<meta property="og:site_name" content="白叁木小肆">
<meta property="og:description" content="概述12345# 启动和停止容器docker start IDdocker restart IDdocker stop IDdocker kill ID">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-08-25T21:57:52.000Z">
<meta property="article:modified_time" content="2021-10-21T17:00:26.468Z">
<meta property="article:author" content="Berlin">
<meta property="article:tag" content="Docker">
<meta name="twitter:card" content="summary">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '',
    scheme: 'Gemini',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":true,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://berlinwong.gitee.io/berlinblog/2021/08/26/Docker概述/"/>





  <title>Docker操作 | 白叁木小肆</title>
  














<meta name="generator" content="Hexo 5.4.0"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta custom-logo">
    

    <div class="custom-logo-site-title">
      <a href="/berlinblog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">白叁木小肆</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">当一个快乐的码农吧！</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/berlinblog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/berlinblog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            Tags
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/berlinblog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/berlinblog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/berlinblog/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            About
          </a>
        </li>
      
        
        <li class="menu-item menu-item-sitemap">
          <a href="/berlinblog/sitemap.xml" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-sitemap"></i> <br />
            
            Sitemap
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://berlinwong.gitee.io/berlinblog/berlinblog/2021/08/26/Docker%E6%A6%82%E8%BF%B0/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/berlinblog/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="白叁木小肆">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Docker操作</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2021-08-26T05:57:52+08:00">
                2021-08-26
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/berlinblog/categories/%E4%BB%A3%E7%A0%81%E5%AE%9E%E6%88%98/" itemprop="url" rel="index">
                    <span itemprop="name">代码实战</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          


          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="概述"><a href="#概述" class="headerlink" title="概述"></a>概述</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 启动和停止容器</span></span><br><span class="line">docker start ID</span><br><span class="line">docker restart ID</span><br><span class="line">docker stop ID</span><br><span class="line">docker <span class="built_in">kill</span> ID</span><br></pre></td></tr></table></figure>

<span id="more"></span>
<h2 id="查看镜像"><a href="#查看镜像" class="headerlink" title="查看镜像"></a>查看镜像</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">┌──(berlin@Berlin-BOOK)-[~]</span><br><span class="line">└─$ sudo docker images                                                                                                                                                                       1 ⨯</span><br><span class="line">[sudo] berlin 的密码：</span><br><span class="line">REPOSITORY    TAG       IMAGE ID       CREATED        SIZE</span><br><span class="line">hello-world   latest    d1165f221234   3 months ago   13.3kB             </span><br></pre></td></tr></table></figure>



<p>Docker命令</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">docker version</span><br><span class="line">docker info</span><br><span class="line">docker </span><br><span class="line">docker --<span class="built_in">help</span></span><br></pre></td></tr></table></figure>

<p>Docker帮助文档</p>
<h2 id="镜像命令"><a href="#镜像命令" class="headerlink" title="镜像命令"></a>镜像命令</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">docker images</span><br><span class="line"></span><br><span class="line">docker search</span><br><span class="line">可选项： --filter=STARS=3000 #STARS大于3000的镜像</span><br><span class="line"></span><br><span class="line">docker pull # 下载镜像 docker分层下载 签名 真实地址</span><br><span class="line"></span><br><span class="line">docker rmi -f IMAGEID #删除指定容器</span><br><span class="line">docker rmi -f IMAGEID IMAGEID IMAGEID #删除多个容器</span><br><span class="line">docker rmi -f $(docker images -aq) # 递归删除</span><br></pre></td></tr></table></figure>

<h2 id="容器命令"><a href="#容器命令" class="headerlink" title="容器命令"></a>容器命令</h2><p>下载Centos镜像</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker pull centos</span><br></pre></td></tr></table></figure>

<p>创建容器并启动</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">docker run [...] image</span><br><span class="line"><span class="meta">#</span><span class="bash"> 参数说明</span></span><br><span class="line">-- name=&quot;Name&quot;</span><br><span class="line">-d     # 后台运行</span><br><span class="line">-it    # 交互方式运行</span><br><span class="line">-p     # 指定端口</span><br><span class="line">			-p  ip:主机端口:容器端口</span><br><span class="line">			-p 主机端口:容器端口(常用)</span><br><span class="line">			-p 容器端口</span><br><span class="line">			端口地址</span><br><span class="line">-P     # 随机指定端口</span><br><span class="line"><span class="meta">#</span><span class="bash"><span class="comment"># Eg. 启动centos</span></span></span><br><span class="line">┌──(root@Berlin-BOOK)-[/home/berlin]</span><br><span class="line">└─# docker run -it centos /bin/bash</span><br><span class="line"></span><br><span class="line">[root@645cb5842a1a /]# ls</span><br><span class="line">bin  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var</span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 退回主机</span></span><br><span class="line">[root@645cb5842a1a /]# exit</span><br><span class="line">exit      </span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 退出容器 <span class="built_in">exit</span></span></span><br><span class="line">CTRL + P + Q #容器不停止退出</span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查看当前运行的镜像</span></span><br><span class="line">└─<span class="comment"># docker ps                      </span></span><br><span class="line">CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES</span><br><span class="line">          </span><br><span class="line"><span class="comment"># docker ps -a 曾经运行过的</span></span><br><span class="line"><span class="comment"># -n=[] 最近创建的容器</span></span><br><span class="line"><span class="comment"># -q 只显示容器的编号</span></span><br><span class="line"></span><br><span class="line">┌──(root@Berlin-BOOK)-[/home/berlin]</span><br><span class="line">└─<span class="comment"># docker ps -a</span></span><br><span class="line">CONTAINER ID   IMAGE          COMMAND       CREATED          STATUS                      PORTS     NAMES</span><br><span class="line">645cb5842a1a   centos         <span class="string">&quot;/bin/bash&quot;</span>   13 minutes ago   Exited (0) 11 minutes ago             focused_hamilton</span><br><span class="line">c03c586491e8   d1165f221234   <span class="string">&quot;/hello&quot;</span>      2 hours ago      Exited (0) 2 hours ago                vigorous_engelbart</span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 删除容器</span></span><br><span class="line">docker rm 容器ID</span><br><span class="line">docker rm -f $(docker ps -aq) <span class="comment">#递归删除容器 -f 强制删除</span></span><br><span class="line">docker ps -a -q|xargs docker</span><br></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 启动和停止容器</span></span><br><span class="line">docker start ID</span><br><span class="line">docker restart ID</span><br><span class="line">docker stop ID</span><br><span class="line">docker <span class="built_in">kill</span> ID</span><br></pre></td></tr></table></figure>



<h2 id="常用其他命令"><a href="#常用其他命令" class="headerlink" title="常用其他命令"></a>常用其他命令</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 后台运行</span></span><br><span class="line">docker run -d centos # ps查看时会发现并没有进程，因为docker在容器没有前台服务时，自动停止</span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 查看日志</span></span><br><span class="line">docker logs -tf --tail 10 ID</span><br><span class="line"><span class="meta">#</span><span class="bash"> tail 后面要加条数 显示指定行数</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> tail 可以用 -n 代替</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> f 持续显示日志</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> t 带时间戳</span></span><br><span class="line">-------------------------------------------------------------------------------</span><br><span class="line">└─# docker run -d centos /bin/sh -c &quot;while true;do echo berlin;sleep 1;done&quot; </span><br><span class="line">f66cd3e9aeb7d62aec273511576f8b0e54962024c90518d12a8b8fce9b545662</span><br><span class="line">                                                                                                                                                                                                 </span><br><span class="line">┌──(root@Berlin-BOOK)-[/home/berlin]</span><br><span class="line">└─# docker ps                                                               </span><br><span class="line">CONTAINER ID   IMAGE     COMMAND                  CREATED         STATUS         PORTS     NAMES</span><br><span class="line">f66cd3e9aeb7   centos    &quot;/bin/sh -c &#x27;while t…&quot;   7 seconds ago   Up 6 seconds             elegant_galileo</span><br><span class="line">                                                                                                                                                                                                 </span><br><span class="line">┌──(root@Berlin-BOOK)-[/home/berlin]</span><br><span class="line">└─# docker logs -f -t --tail 10 f66cd3e9aeb7 2021-06-14T13:34:22.097767109Z berlin</span><br><span class="line">2021-06-14T13:34:23.101832198Z berlin</span><br><span class="line">2021-06-14T13:34:24.105838947Z berlin</span><br><span class="line">2021-06-14T13:34:25.109940648Z berlin</span><br><span class="line">2021-06-14T13:34:26.113648755Z berlin</span><br><span class="line">2021-06-14T13:34:27.115549552Z berlin</span><br><span class="line">2021-06-14T13:34:28.119678858Z berlin</span><br><span class="line">2021-06-14T13:34:29.124127443Z berlin</span><br><span class="line">2021-06-14T13:34:30.128461303Z berlin</span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 查看docker内部进程信息</span></span><br><span class="line">docker top ID</span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> docker inspect ID <span class="comment">#查看当前容器所有信息</span></span></span><br><span class="line">进入docker容器进行操作</span><br><span class="line"><span class="meta">#</span><span class="bash"> docker <span class="built_in">exec</span> -it ID /bin/sh</span>  </span><br><span class="line"><span class="meta">#</span><span class="bash"> docker attach ID</span></span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 文件从docker 拷贝到本机</span></span><br><span class="line">docker cp ID:容器路径 本机路径</span><br><span class="line">┌──(root@Berlin-BOOK)-[/]</span><br><span class="line">└─# docker cp 20226d3abe30:/home/test.java /home/berlin/桌面</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="Elasticsearch"><a href="#Elasticsearch" class="headerlink" title="Elasticsearch"></a>Elasticsearch</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> docker stats  查看当前资源占用</span></span><br><span class="line">-e 环境配置修改 -e ES_JAVA_OPTS=&quot;-Xms64m -Xmx512m&quot;</span><br></pre></td></tr></table></figure>

<h2 id="UnionFS（联合文件系统）"><a href="#UnionFS（联合文件系统）" class="headerlink" title="UnionFS（联合文件系统）"></a>UnionFS（联合文件系统）</h2><h2 id="分层原理"><a href="#分层原理" class="headerlink" title="分层原理"></a>分层原理</h2><h2 id="容器数据卷"><a href="#容器数据卷" class="headerlink" title="容器数据卷"></a>容器数据卷</h2><h2 id="使用-数据卷"><a href="#使用-数据卷" class="headerlink" title="使用 数据卷"></a>使用 数据卷</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">方式一：直接使用命令挂载 docker run -it -v [/home/test:/home]</span><br><span class="line"></span><br><span class="line">权限问题会导致目录为空，如何解决呢？暂时未解决 </span><br><span class="line">chmod 777 /home/test</span><br></pre></td></tr></table></figure>


      
    </div>
    
    
    
    
      <div style="text-align:center;color: #634db5;font-size:12px;">
-------------  本文结束 <i class="fa fa-cog fa-spin fa-1x fa-fw"></i> 感谢阅读  -------------
</div>

    
    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/berlinblog/tags/Docker/" rel="tag"><i class="fa fa-tag"></i> Docker</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/berlinblog/2021/08/27/Port/" rel="prev" title="端口占用问题解决方案">
                端口占用问题解决方案 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/berlinblog/images/avatar.png"
               alt="" />
          <p class="site-author-name" itemprop="name"></p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/berlinblog/archives/">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">posts</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/berlinblog/categories/index.html">
                <span class="site-state-item-count">4</span>
                <span class="site-state-item-name">categories</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/berlinblog/tags/index.html">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">tags</span>
              </a>
            </div>
          

        </nav>

        
          <div class="feed-link motion-element">
            <a href="/berlinblog/atom.xml" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://gitee.com/berlinwong" target="_blank" title="Gitee">
                  
                    <i class="fa fa-fw fa-git"></i>
                  
                    
                      Gitee
                    
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="wzysws@gmail.com" target="_blank" title="E-Mail">
                  
                    <i class="fa fa-fw fa-envelope"></i>
                  
                    
                      E-Mail
                    
                </a>
              </span>
            
          
        </div>

        
        
          <div class="cc-license motion-element" itemprop="license">
            <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" target="_blank">
              <img src="/berlinblog/images/cc-by-nc-sa.svg" alt="Creative Commons" />
            </a>
          </div>
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%A6%82%E8%BF%B0"><span class="nav-number">1.</span> <span class="nav-text">概述</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%9F%A5%E7%9C%8B%E9%95%9C%E5%83%8F"><span class="nav-number">2.</span> <span class="nav-text">查看镜像</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%95%9C%E5%83%8F%E5%91%BD%E4%BB%A4"><span class="nav-number">3.</span> <span class="nav-text">镜像命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%B9%E5%99%A8%E5%91%BD%E4%BB%A4"><span class="nav-number">4.</span> <span class="nav-text">容器命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%B8%B8%E7%94%A8%E5%85%B6%E4%BB%96%E5%91%BD%E4%BB%A4"><span class="nav-number">5.</span> <span class="nav-text">常用其他命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Elasticsearch"><span class="nav-number">6.</span> <span class="nav-text">Elasticsearch</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#UnionFS%EF%BC%88%E8%81%94%E5%90%88%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%EF%BC%89"><span class="nav-number">7.</span> <span class="nav-text">UnionFS（联合文件系统）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%88%86%E5%B1%82%E5%8E%9F%E7%90%86"><span class="nav-number">8.</span> <span class="nav-text">分层原理</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%B9%E5%99%A8%E6%95%B0%E6%8D%AE%E5%8D%B7"><span class="nav-number">9.</span> <span class="nav-text">容器数据卷</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BD%BF%E7%94%A8-%E6%95%B0%E6%8D%AE%E5%8D%B7"><span class="nav-number">10.</span> <span class="nav-text">使用 数据卷</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-ravelry"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Berlin</span>
</div>



        

        
      </div>
    </footer>

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/berlinblog/libs/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/berlinblog/libs/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/berlinblog/js/src/utils.js?v=5.1.2"></script>

  <script type="text/javascript" src="/berlinblog/js/src/motion.js?v=5.1.2"></script>



  
  


  <script type="text/javascript" src="/berlinblog/js/src/affix.js?v=5.1.2"></script>

  <script type="text/javascript" src="/berlinblog/js/src/schemes/pisces.js?v=5.1.2"></script>



  
  <script type="text/javascript" src="/berlinblog/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/berlinblog/js/src/post-details.js?v=5.1.2"></script>



  


  <script type="text/javascript" src="/berlinblog/js/src/bootstrap.js?v=5.1.2"></script>



  


  




	





  





  






  





  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  

  

  

  

</body>
</html>
